package com.zhang.passer.controller;

import com.alibaba.fastjson.JSON;
import com.zhang.passer.domain.ImageDo;
import com.zhang.passer.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/image")
public class ImageController {

    @Autowired
    ImageService imageService;

    @ResponseBody
    @RequestMapping("/query")
    public String selectController(ImageDo imageDo){
        List<ImageDo> list = imageService.queryAll(imageDo);
        return JSON.toJSONString(list);
    }



}
